<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="../lib/layui/css/layui.css" />
		<link rel="stylesheet" type="text/css" href="../css/add-article.css"/>
		<script src="../js/ajax.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" href="/assets/lib/cropper/cropper.css" />
		<script src="../lib/jquery.js" type="text/javascript" charset="utf-8"></script>
		<script src="../lib/cropper/Cropper.js" type="text/javascript" charset="utf-8"></script>
		<script src="../lib/cropper/jquery-cropper.js" type="text/javascript" charset="utf-8"></script>
		<script src="../lib/template-web.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<form enctype="multipart/form-data" id="file"  class="layui-form" action="" lay-filter="fileAll">
			<div class="layui-card-header">
			写文章 
			</div>
		  <div class="layui-form-item">
		    <label class="layui-form-label">文章标题</label>
		    <div class="layui-input-block">
		      <input type="text" name="title" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
		    </div>
		  </div>
		  <div class="layui-form-item">
		      <label class="layui-form-label">文章类型</label>
		      <div class="layui-input-block">
				  <select name="cate_id" lay-verify="" id="select" lay-filter="selects">
				  </select> 
		      </div>
		    </div>
		  <div class="layui-form-item" id="editor">
			   <label class="layui-form-label">文章内容</label>
		      <textarea id="demo" lay-verify="content"  style="display:none;"></textarea>
		  </div>
		  <div class="layui-card-body">
		  	<div class="layui-card-header">文章封面</div>
		  	<div class="bigBox">
		  		<div class="big-mage">
		  			<img id="image"  src="../images/sample.jpg" >
		  			<img dir="image2" src="" style="display: none;">
		  		</div>
		  		<div class="min-mage">
		  			<div class="MM-top img-preview">
		  				
		  			</div>
		  			<p>100*100</p>
						<input type="file" name="cover_img" id="img-file" />
		  			 <button type="button" class="layui-btn layui-btn-danger"  id="btnChooseImage">选择封面</button>
		  		</div>
		  	</div>
		  </div>
		    <div class="layui-input-block">
		      <button id="issue" class="layui-btn" lay-submit="" type="submit" lay-filter="formDemo">发布</button>
		      <button type="button" class="layui-btn layui-btn-primary">存为草稿</button>
		    </div>
		</form>
		<script type="text/html" id="tpl">
			{{each info}}
			<option id="{{$value.id}}" value="{{$value.Id}}">{{$value.name}}</option>
			{{/each}}
		</script>
		<script src="../lib/layui/layui.all.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/add-article.js" type="text/javascript" charset="utf-8"></script>
		<script>
		//Demo
		layui.use(['form','layedit'], function(){
		  var form = layui.form;
		  //监听提交
		  form.on('submit(formDemo)', function(data){
		    layer.msg(JSON.stringify(data.field));
		    return false;
		  });
		});
		</script>
	</body>
</html>
